package api_.collectionTest;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

public class IteratorStringTest
{
    public static void main(String[] args)
    {
        Collection<String> collection = new ArrayList<>();
        collection.add("a");
        collection.add("b");
        collection.add("c");
        collection.add("d");
        collection.add("e");
        collection.add("f");
        Iterator<String> iterator = collection.iterator();
        while (iterator.hasNext())
        {
            String string  = iterator.next();
            System.out.println(string.toUpperCase());
        }
    }
}
